﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;

namespace ZombieMonkeys.Vibria.Audio
{
    /// <summary>
    /// This represents the functionality to find and play sounds
    /// </summary>
    public class SoundPlayer
    {


        private static SoundPlayer instance;

        private SoundPlayer()
        { 
            
        }

        public static SoundPlayer GetSoundPlayer()
        { 
            if (instance == null)
            {
                instance = new SoundPlayer();
            }
            return instance;
        }

        /// <summary>
        /// Creates an internal SoundEffectInstance from which to play the specified SoundEffect
        /// </summary>
        /// <param name="currentSound">The current SoundEffect to use</param>
        public void PlaySound(SoundEffect currentSound)
        {

            SoundEffectInstance soundInstance = currentSound.CreateInstance();
            soundInstance.Play();
            
        }
    }
}
